package com.qf.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.entity.TbFillQuestion;
import com.qf.entity.TbJudgeQuestion;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FillQuestionDao extends BaseMapper<TbFillQuestion> {

    /**
     * 根据试卷编号查询所有选择题
     * @param testpaperId
     * @return
     */
    @Select("SELECT * FROM `tb_fill_question` WHERE `question_id` IN (SELECT `question_id` FROM`tb_testpaper_question` WHERE `question_type` = 3 AND `testpaper_id` = #{testpaperId})  ")
    List<TbFillQuestion> findByIdAndType(Integer testpaperId);
}
